﻿/**************************************************************
 * Description:
 * AITBarCodeUseBListUIModelAction.cs
 * Product: U9
 * Co.    : UFIDA Group
 * Author : Auto Generated
 * version: 2.0
 **************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UFSoft.UBF.Util.Log;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.ActionProcess;
using UFSoft.UBF.UI.IView; 
using System.Data;
using UFIDA.UBF.Query.CommonService;
using UFSoft.UBF.UI.FormProcess;
using UFSoft.UBF.UI.ControlModel;
using UFIDA.UBF.Query.CommonService.QueryStrategy;
using UFIDA.UBF.Query.CaseModel;
using UFIDA.U9.UI.PDHelper;
using UFSoft.UBF.ExportService;

namespace UFIDA.U9.CUST.AITBarCodeUseBListUIModel
{
	public partial class AITBarCodeUseBListUIModelAction : BaseAction
	{
		private static readonly ILogger logger = LoggerManager.GetLogger(typeof(AITBarCodeUseBListUIModelAction));
		//强类型化基类Model属性.
		public new AITBarCodeUseBListUIModelModel CurrentModel 
		{
			get {
				return (AITBarCodeUseBListUIModelModel)base.CurrentModel;
			}
			set {
				base.CurrentModel = value ;
			}
		}
		
		public AITBarCodeUseBListUIModelAction(IPart part) : base(part)
		{
		}
		//Model参数的构造,用于测试用例.
		public AITBarCodeUseBListUIModelAction(AITBarCodeUseBListUIModelModel model) : base(model)
		{
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnLookCase(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnLookCase_Extend);
		}
		private void OnLookCase_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:QryClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("QryClick",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnCaseChanged(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnCaseChanged_Extend);
		}
		private void OnCaseChanged_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	        QryService.OnCaseChangedDefault("DDLCase", this.CurrentPart);
		QueryAdjust();
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnOutPut(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnOutPut_Extend);
		}
		private void OnOutPut_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnOutPut
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnOutPut",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnGridRowDbClick(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnGridRowDbClick_Extend);
		}
		private void OnGridRowDbClick_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnNew(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnNew_Extend);
		}
		private void OnNew_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnPrint(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnPrint_Extend);
		}
		private void OnPrint_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnPrint
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnPrint",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnDelete(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnDelete_Extend);
		}
		private void OnDelete_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:ListDeleteClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("ListDeleteClick",this,sender,e);

	  
		}
		#region Action的内置两个Action.
		/// <summary>
		/// Help: 数据加载(发生在Form的初始化加载时)
		/// </summary>
		public void OnLoadData(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnLoadData_Extend(sender,e) ;
		}
		private void OnLoadData_DefaultImpl(object sender, UIActionEventArgs e)
		{
		   
		     InitCaseModel();
				}
		/// <summary>
		/// Help: 数据收集(发生在Form的CallBack或者是PostBack时)
		/// </summary>
		public void OnDataCollect(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnDataCollect_Extend(sender,e) ;
		}
		private void OnDataCollect_DefaultImpl(object sender, UIActionEventArgs e)
		{
		    UFIDA.U9.UI.Commands.CommandFactory.DoCommand("DataCollect",this,sender,e);
		}
		#endregion
         

            
        #region BE列表自动产生的代码
        
		public void QueryAdjust()
		{
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;

			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.CUST.AITBarCodeUseBE.AITBarCodeUse", "fde1a716-d341-4279-9cba-9ad788fa690a", UIGrid.UIView, UIGrid, 1);

			beQryStrategyImpl.Adjust();
		    
			AfterQryAdjust_Extend(UIGrid);

			UIGrid.UIView.CurrentFilter.OPath = CustomFilterOpath_Extend(QryService.GetDefaultOpath((BaseWebForm)(this.CurrentPart)));
			UIGrid.UIView.CurrentFilter.OrderBy = QryService.GetOrderByOpath((BaseWebForm)(this.CurrentPart));

			UIGrid.UIView.Clear();
			this.NavigateAction.FirstPage(null);

			//20090316 UBF2.9_查询_yzx_修改查询设计器的tpl_用于显示多webpart查询的IE状态栏提示信息
			QryService.ShowQueryInfoInIEStatusBar((BaseWebForm)this.CurrentPart, UIGrid.UIView);
		}

		public void InitCaseModel()
		{
			QryService.ClearSession((UFSoft.UBF.UI.FormProcess.BaseWebForm)(this.CurrentPart));
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;
			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.CUST.AITBarCodeUseBE.AITBarCodeUse", "fde1a716-d341-4279-9cba-9ad788fa690a", UIGrid.UIView, UIGrid, 1);
			beQryStrategyImpl.QueryComponentXMLCompressed = @"7Va7bhtHFFWaNKnyB8T2I+3MzhMQZUikBBBQLFki1c/jjrTJcpdYLm2pTJoABgTLhdMFSIogqQJ3
QYL8DmXkK5LZJRmLFGQ4iEregjP3zuPcc3hnZjc+2djY+DtY3db2ad25/nz7yeUwaz2HcpwWeTvC
m3HUgtwWLs3P29Gk8khGT3a2n02gvOoUw1GRQ161UteOFIlBOmuQIgYQBaeQ1NwjHKLEMItpYqNW
rofQjnZ7/T1ddgoHgzEcpuMqarl0PMr01dMHx2Fsy3RUNWlFrQvIRnXbJNK/GoVFs3lNYHDSa0fe
AdYCc+QSihElQiFljUZKOyGl11zFej7/tJiUFg4mWTbDHxz0urubA7XZGZz2N5ey2dtf9qPWoHeW
wotuqc9nedS9bvEij1on4Hu5Lw4L7WZDHW0vINrZ3tPj1NZDjXLSUW+scIgJZxBVXiLjFUOSK+st
AUN0slBuRagHdQnQ/eIraGInRVF1w7ROkVdwWZ3pbNIsPUizCsq+NmfpODVZiPXLSSDUKbLJML8f
Py3K6n50tsv+5Ujn7hCeQ9aOksUeq9F6h9XYVpDjeK5UI0dMiSEyiECx8IhqkiAprURYGakpZYpr
/l/lOC6LL8FWve4d51hXF7W7d9yrYDgb2js+GkGp6+WzQLd/tBjZPQ+l3s2yO17Y6fKq9gOJQe8u
Ce0NpZ4QRLmxNROFQu4UGWOw5tgQFcNjkhj0vgj1mC2YyKAaNRIQw6BC7ROMJPEcCSYtJrG1Pk7q
RQdFOVys8VYrTgUgrlw4wBpkOMCKIie1Z0YApYq9BwoLCEsopzJBxAqOKJMCyQQzpA3hNObMOyob
abrg9SSrOnoM89qfFc14yWt0oyLWYdsExXHMEDWOI8MThsARpiihinu20G1+CFfku/3+x3c/fP2g
iFv3MbEAZ4xPEPVYICoCGUmEQCwUmo8x0Z7IBeZpabuFfVrcA/3p9o+b6fWb6avfPgS9tcx+IUxz
WII/6zRJASFBcG6RECKphcDIxAlGSgFQp1hdXv9XiDtwXFDuYu2RE4yG2xsI0lhLRLi2EpyLTfIv
3LPqahXqzdu/vn31kVCBSvgjjUTCunA+LAk3XSziACo5OK9dwuwjyX0HVVvHMA3lJJPwBlCgoSc1
RjELdeuc4M7EC9R+qfNxNy3D+Qp7rmBP//xm+vKX2+9+n968/ljG4JizTCBufWBcV7bRhiGBLSc1
PBizwjj0H+J8e/3r9Ob63c9vP1hoq6U19+sbOHh1M3t7bMJBg0GWkPD2JAlFyoTUKLY29jL8vpel
U4KuwB2tKvJgHs2DMXsT9087S3nN89hauhq2lj8rdj7bWNva1ra2ta1tbY9o/wA=";
		    
			BeforeGetQryModel_Extend(beQryStrategyImpl);
		    
			CaseModel caseModel = beQryStrategyImpl.GetQryModel();
		    
			AfterGetQueryModel_Extend(caseModel);
		    
			QryService.SetCaseModelToSession((BaseWebForm)(this.CurrentPart), caseModel);
		}
        
        
         #endregion
         

	}
}
